package com.health.yb;

import com.health.yb.core.utils.SpringContextUtil;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@EnableTransactionManagement//spring boot注解事务
@EnableAspectJAutoProxy//表示使用cglib生成代理对象
@EnableScheduling//定时器
@MapperScan("com.health.yb.web.mapper")
@Slf4j
public class YbHealthApplication {

    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(YbHealthApplication.class, args);
        SpringContextUtil.setApplicationContext(applicationContext);

    }

}
